
component accessors="true" output="false" extends="AbsDelegate"
{

	property name="PermissionFactory" type="it.millemultimedia.easyBlog.factory.PermissionFactory";

	public it.millemultimedia.easyBlog.delegate.PermissionDelegate function init( required Any dataObject ){
		
		variables.dataObject = arguments.dataObject;
		
		return this;
	}
	
	public it.millemultimedia.easyBlog.validator.PermissionValidator function getValidator(){
		
		return getPermissionFactory().getValidator();
	}
	
	public it.millemultimedia.easyBlog.model.Permission function createInstance(){
		
		return getPermissionFactory().createInstance();
	}
	
	public it.millemultimedia.easyBlog.model.Permission[] function createList( required String list, required String propertyName ){
		
		return getPermissionFactory().createList( arguments.list, arguments.propertyName );
	}

	public void function create( required Any Permission ){
		
		variables.dataObject.create( argumentCollection=arguments );
		
	}

	public void function update( required Any Permission ){
		
		variables.dataObject.update( argumentCollection=arguments );
		
	}

	public it.millemultimedia.easyBlog.model.Permission function read( required Any Permission ){
	
		var list = "";
		var Permissions = variables.dataObject.read( arguments.Permission );
		
		Permission = getPermissionFactory().get( Permissions );
		
		
		return Permission;
		
	}

	public void function delete( required Any Permission ){
		
		variables.dataObject.delete( argumentCollection=arguments );
		
	}

	public it.millemultimedia.easyBlog.model.Permission[] function list( required Any Permission, Numeric start=0, Numeric count=0 ){
	
		var list = "";
		var Permissions = variables.dataObject.list( arguments.Permission );
		
		list = getPermissionFactory().list( Permissions, arguments.start, arguments.count );
		
		
		return list;
		
	}

}


